<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-nested" prefix="nested" %>
<%@ page import="lwf.handler.english.word.AlphabetDictionaryHandler"%>
<html>
   <head>
	   <script>
		  function processURL(alphabet) {
		    document.getElementById("dictionaryblock").innerHTML = '';
		    url = '/lwf/alphabetdictionary.do?action=newdisplay&alphabet=' + alphabet;
		    retrieveURL(url, 'dictionaryblock');
		  }
		  
		  function processDisplay(action) {
	     		document.getElementById("dictionaryblock").innerHTML = '';
			    var url = '/lwf/alphabetdictionary.do?action=';
			    if(action == 'next') {
			       url = url + 'shownext';
			    }
			    else if(action == 'previous') {
			       url = url + 'showprevious';
			    }
			    retrieveURL(url, 'dictionaryblock');
		  }
      </script>
   </head>
   <html:form action="/alphabetdictionary" >
	   <table border="0" align="center" width="100%" bordercolor="red">
	       <tr>
	           <td align="center">
	               <fieldset><legend>Click one of the following alphabet</legend>
	                   <%=AlphabetDictionaryHandler.getAlphabetKeys()%>
	               </fieldset>
	           </td>
	       </tr> 
	       <tr>
	           <td>
	               <table border="0" width="100%">
	                  <tr>
	                      <td align="center">
	                         <span id="dictionaryblock"></span>
	                      </td>
	                  </tr>                  
	               </table>
	           </td>
	       </tr>
	   </table>  
   </html:form>
</html>